<template>
  <div class="all">
    <!-- 批量删除 -->
    <el-button class="allDelete" v-if="isDelete" type="danger" plain @click="toDelete" size="mini" icon="el-icon-delete" :disabled="disabled">批量删除</el-button>
    <el-button class="allDelete" v-else type="danger" plain @click="abandoneds" size="mini" icon="el-icon-delete" :disabled="disabled">批量作废</el-button>
  </div>
</template>
<script>
export default {
  props: {
    disabled: {
      type: Boolean,
      default: false,
    },
    abandoned: {
      type: Function,
      default: () => {},
    },
    isDelete: {
      type: Boolean,
      default: true,
    },
  },
  methods: {
    toDelete() {
      this.$emit('toDelete', '点击了删除')
    },
    abandoneds() {
      this.$emit('abandoned', '点击了废弃')
    },
  },
}
</script>
<style lang="scss" scoped>
</style>
